<?php
require 'kernel/common.php';

if(!$Session->check_admin()) redirect('index.php');
 //Recuperation configuration
$temp = array(
'titre_site'	=>	'Titre du site',
'keywords'	=>	'maison,appartement',
'description_site'	=>	'Description du site',
'annonce_par_page'	=>	'20',
'contenue_accueil'	=>	'contenue accueil',
'googlemap_key'	=>	'0123445567879',
'google_analytics'	=>	'',
'google_identifiant_site'	=>	'',
'email_contact'	=>	'email_de_contact',
'footer_text'	=>	'message_bas_page',
'affiche_secteur_annonce'	=>	'1',
'affiche_ville_annonce'	=>	'0',
'theme'	=>	'',
'dvlp_mod'	=>	'0',
'map_accueil'	=>	'1',
'url_rewrite'	=>	'0',
'page_accueil'  =>  '',
'affiche_ville_annonce' =>  '0',
'affiche_flux_annonce'  =>  '0',
'log_identification'    =>  '1',
'image_captcha_identification'  =>  '1',
// AJOUT 1.2.0
'mail_method'   =>  'php_mail',
'smtp_server'   =>  '',
'smtp_port'    =>  '25',
'smtp_login'    =>  '',
'smtp_password' =>  '',
);

foreach($temp as $key => $value)
{
    $GLOBALS['db']->sql_query("UPDATE immo_config SET setting = '" . $value . "' WHERE module = '". $key ."'");
}


//$GLOBALS['db']->sql_query("UPDATE immo_config SET setting = '". serialize($temp) ."' WHERE module = 'generale'");
$GLOBALS['cache']->remove('setting_immophp');
redirect('setting.php?error=raz_config',10);
?>